package com.itheima.udp;

import java.io.IOException;
import java.net.*;
import java.util.Scanner;

public class Client {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();

        Scanner sc = new Scanner(System.in);
        while (true) {
            String next = sc.next();
            byte[] bytes = next.getBytes();
            if(next.equals("886")){
                break;
            }

            InetAddress ip = InetAddress.getByName("255.255.255.255");

            DatagramPacket dp = new DatagramPacket(bytes,bytes.length,ip,10000);
            ds.send(dp);
        }

        ds.close();
    }
}
